package com.sj.parksdk.fragment.certificate;

import com.sj.parksdk.R;
import com.sj.parksdk.R2;
import com.sj.parksdk.core.BaseFragment;
import com.sj.parksdk.net.http.MyNetApi;
import com.sj.parksdk.net.http.callback.TipRequestCallBack;
import com.sj.parksdk.net.request.MGetRequest;
import com.sj.parksdk.net.result.databean.Data_User;
import com.xuexiang.xpage.annotation.Page;
import com.xuexiang.xui.widget.textview.supertextview.SuperTextView;

import butterknife.BindView;
@Page(name = "身份认证信息")
public class FragmentUserCertificateContent extends BaseFragment {
    @BindView(R2.id.stv_name)
    SuperTextView stvName;
    @BindView(R2.id.stv_idnumber)
    SuperTextView stvIdnumber;

    @Override
    protected int getLayoutId() {
        return R.layout.parksdk_fragment_user_certficate_centent;
    }

    @Override
    protected void initViews() {

    }

    @Override
    protected void initData() {
        new MGetRequest(MyNetApi.USER_CERTIFICAT_INFO).user().execute(new TipRequestCallBack<Data_User>() {
            @Override
            public void onSuccess(Data_User data) throws Throwable {
                stvName.setCenterString(data.getName());
                stvIdnumber.setCenterString(data.getIdNo());
            }
        });
    }
}
